SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_CDS_DistributorBillingConfigGet]
	@ID int
AS
BEGIN
	SELECT DBC.[ID],
      [DistributorID],
      DC.[name] AS [DistributorName],
      [BillingConfigID],
      BC.[Name] AS [BillingConfigName],
      [BillingStartDate],
      [TrialAccount],
      [TrialAccountDate],
      [ContractDate],
      [ServiceStatement],
      [AcumenID],
      [CurrencyID],
      [ExchangeRate],
      [Enabled]
	FROM [DnnProduct_CDS_DistributorBillingConfig] DBC
	INNER JOIN [DISC_DistributorConfig] DC ON DBC.DistributorID = DC.distID
	LEFT JOIN [DnnProduct_CDS_BillingConfig] BC ON DBC.BillingConfigID = BC.ID
	WHERE DBC.[ID] = @ID
END
GO
